<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>JSDoc: Class: HttpClient</title>
    
    <script src="scripts/prettify/prettify.js"> </script>
    <script src="scripts/prettify/lang-css.js"> </script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>

<body>

<div id="main">
    
    <h1 class="page-title">Class: HttpClient</h1>
    
    



<section>
    
<header>
    <h2>
        <span class="ancestors"><a href="http.html">vertx/http</a>.</span>
    
    HttpClient
    </h2>
    
</header>  

<article>
    <div class="container-overview">
    
    
    
        
<dt>
    <h4 class="name" id="HttpClient"><span class="type-signature"></span>new HttpClient<span class="signature">()</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>An HTTP client that maintains a pool of connections to a specific host, at a
specific port. The client supports pipelining of requests.</p>
<p>As well as HTTP requests, the client can act as a factory for 
HTML5 <a href="http.WebSocket.html"><code>websockets</code></a>.</p>
    </div>
    

    
    
    
    
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="http.js.html">vertx/http.js</a>, <a href="http.js.html#line821">line 821</a>
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    
    
</dd>

    
    </div>
    
    
    
    
        <h3 class="subsection-title">Mixes In</h3>
        
        <ul>
            <li><a href="TCPSupport.html">TCPSupport</a></li>
        
            <li><a href="SSLSupport.html">SSLSupport</a></li>
        
            <li><a href="ClientSSLSupport.html">ClientSSLSupport</a></li>
        </ul>
    
    
    
    
    
    
    
    
    
    
    
        <h3 class="subsection-title">Methods</h3>
        
        <dl>
            
<dt>
    <h4 class="name" id="close"><span class="type-signature"></span>close<span class="signature">()</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Close the client
    </div>
    

    
    
    
    
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="http.js.html">vertx/http.js</a>, <a href="http.js.html#line1085">line 1085</a>
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="connect"><span class="type-signature"></span>connect<span class="signature">(uri, handler)</span><span class="type-signature"> &rarr; {<a href="http.HttpClientRequest.html">module:vertx/http.HttpClientRequest</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        This method returns an request which represents an HTTP CONNECT request with the specified uri.
When an HTTP response is received from the server the handler is called passing in the response.
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>uri</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
            
            
            
            <td class="description last">A relative URI where to perform the CONNECT on the server.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>handler</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#ResponseHandler">ResponseHandler</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">The handler to be called</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="http.js.html">vertx/http.js</a>, <a href="http.js.html#line1053">line 1053</a>
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type"><a href="http.HttpClientRequest.html">module:vertx/http.HttpClientRequest</a></span>


	</dd>
</dl>

        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="connectWebsocket"><span class="type-signature"></span>connectWebsocket<span class="signature">(uri, handler)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Attempt to connect an HTML5 websocket to the specified URI.
The connect is done asynchronously and the handler is called with a WebSocket on success.
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>uri</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
            
            
            
            <td class="description last">A relative URI where to connect the websocket on the host, e.g. /some/path</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>handler</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#WebSocketHandler">WebSocketHandler</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">The handler to be called with the WebSocket</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="http.js.html">vertx/http.js</a>, <a href="http.js.html#line943">line 943</a>
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="delete"><span class="type-signature"></span>delete<span class="signature">(uri, handler)</span><span class="type-signature"> &rarr; {<a href="http.HttpClientRequest.html">module:vertx/http.HttpClientRequest</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        This method returns an request which represents an HTTP DELETE request with the specified uri.
When an HTTP response is received from the server the handler is called passing in the response.
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>uri</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
            
            
            
            <td class="description last">A relative URI where to perform the DELETE on the server.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>handler</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#ResponseHandler">ResponseHandler</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">The handler to be called</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="http.js.html">vertx/http.js</a>, <a href="http.js.html#line1029">line 1029</a>
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type"><a href="http.HttpClientRequest.html">module:vertx/http.HttpClientRequest</a></span>


	</dd>
</dl>

        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="exceptionHandler"><span class="type-signature"></span>exceptionHandler<span class="signature">(handler)</span><span class="type-signature"> &rarr; {<a href="http.HttpClient.html">module:vertx/http.HttpClient</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Set the exception handler.
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>handler</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#Handler">Handler</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">The handler which is called on an exception</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="http.js.html">vertx/http.js</a>, <a href="http.js.html#line835">line 835</a>
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type"><a href="http.HttpClient.html">module:vertx/http.HttpClient</a></span>


	</dd>
</dl>

        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="get"><span class="type-signature"></span>get<span class="signature">(uri, handler)</span><span class="type-signature"> &rarr; {<a href="http.HttpClientRequest.html">module:vertx/http.HttpClientRequest</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        This method returns an request which represents an HTTP GET request with the specified uri.
When an HTTP response is received from the server the handler is called passing in the response.
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>uri</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
            
            
            
            <td class="description last">A relative URI where to perform the GET on the server.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>handler</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#ResponseHandler">ResponseHandler</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">The handler to be called</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="http.js.html">vertx/http.js</a>, <a href="http.js.html#line981">line 981</a>
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type"><a href="http.HttpClientRequest.html">module:vertx/http.HttpClientRequest</a></span>


	</dd>
</dl>

        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="getNow"><span class="type-signature"></span>getNow<span class="signature">(uri, handler)</span><span class="type-signature"> &rarr; {<a href="http.HttpClientRequest.html">module:vertx/http.HttpClientRequest</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        This is a quick version of the get method where you do not want to do anything with the request
before sing.
With this method the request is immediately sent.
When an HTTP response is received from the server the handler is called passing in the response.
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>uri</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
            
            
            
            <td class="description last">A relative URI where to perform the GET on the server.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>handler</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#ResponseHandler">ResponseHandler</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">The handler to be called</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="http.js.html">vertx/http.js</a>, <a href="http.js.html#line957">line 957</a>
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type"><a href="http.HttpClientRequest.html">module:vertx/http.HttpClientRequest</a></span>


	</dd>
</dl>

        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="head"><span class="type-signature"></span>head<span class="signature">(uri, handler)</span><span class="type-signature"> &rarr; {<a href="http.HttpClientRequest.html">module:vertx/http.HttpClientRequest</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        This method returns an request which represents an HTTP HEAD request with the specified uri.
When an HTTP response is received from the server the handler is called passing in the response.
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>uri</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
            
            
            
            <td class="description last">A relative URI where to perform the HEAD on the server.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>handler</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#ResponseHandler">ResponseHandler</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">The handler to be called</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="http.js.html">vertx/http.js</a>, <a href="http.js.html#line993">line 993</a>
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type"><a href="http.HttpClientRequest.html">module:vertx/http.HttpClientRequest</a></span>


	</dd>
</dl>

        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="host"><span class="type-signature"></span>host<span class="signature">(<span class="optional">host</span>)</span><span class="type-signature"> &rarr; {string|<a href="http.HttpClient.html">module:vertx/http.HttpClient</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Get or set the host name or ip address that the client will attempt to
 connect to on the server on
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		<th>Argument</th>
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>host</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
                <td class="attributes">
                
                    &lt;optional><br>
                
                    
                
                    
                
                </td>
            
            
            
            
            <td class="description last">The host name or IP address.</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="http.js.html">vertx/http.js</a>, <a href="http.js.html#line909">line 909</a>
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type">string</span>
|

<span class="param-type"><a href="http.HttpClient.html">module:vertx/http.HttpClient</a></span>


	</dd>
</dl>

        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="keepAlive"><span class="type-signature"></span>keepAlive<span class="signature">(<span class="optional">keepAlive</span>)</span><span class="type-signature"> &rarr; {boolean|<a href="http.HttpClient.html">module:vertx/http.HttpClient</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>
Get or set if the client use keep alive. If <code>keepAlive</code> is
<code>true</code> then, after the request has ended the connection will be
returned to the pool where it can be used by another request. In this
manner, many HTTP requests can be pipe-lined over an HTTP connection.
Keep alive connections will not be closed until the <code>close()</code>
method is invoked.</p>
<p>
If <code>keepAlive</code> is <code>false</code> then a new connection will
be created for each request and it won't ever go in the pool, and the
connection will closed after the response has been received. Even with no
keep alive, the client will not allow more than <code>getMaxPoolSize()</code>
connections to be created at any one time.</p> 
<p>
If <code>keepAlive</code> is <code>undefined</code> returns the current
keep alive status of this client.
</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		<th>Argument</th>
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>keepAlive</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">boolean</span>


            
            </td>
            
            
                <td class="attributes">
                
                    &lt;optional><br>
                
                    
                
                    
                
                </td>
            
            
            
            
            <td class="description last"></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="http.js.html">vertx/http.js</a>, <a href="http.js.html#line877">line 877</a>
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type">boolean</span>
|

<span class="param-type"><a href="http.HttpClient.html">module:vertx/http.HttpClient</a></span>


	</dd>
</dl>

        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="maxPoolSize"><span class="type-signature"></span>maxPoolSize<span class="signature">(<span class="optional">size</span>)</span><span class="type-signature"> &rarr; {number|<a href="http.HttpClient.html">module:vertx/http.HttpClient</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Get or set the maxium number of connections this client will pool
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		<th>Argument</th>
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>size</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>
            
            
                <td class="attributes">
                
                    &lt;optional><br>
                
                    
                
                    
                
                </td>
            
            
            
            
            <td class="description last">the maximum number of connection</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="http.js.html">vertx/http.js</a>, <a href="http.js.html#line846">line 846</a>
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type">number</span>
|

<span class="param-type"><a href="http.HttpClient.html">module:vertx/http.HttpClient</a></span>


	</dd>
</dl>

        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="options"><span class="type-signature"></span>options<span class="signature">(uri, handler)</span><span class="type-signature"> &rarr; {<a href="http.HttpClientRequest.html">module:vertx/http.HttpClientRequest</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        This method returns an request which represents an HTTP OPTIONS request with the specified uri.
When an HTTP response is received from the server the handler is called passing in the response.
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>uri</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
            
            
            
            <td class="description last">A relative URI where to perform the OPTIONS on the server.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>handler</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#ResponseHandler">ResponseHandler</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">The handler to be called</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="http.js.html">vertx/http.js</a>, <a href="http.js.html#line969">line 969</a>
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type"><a href="http.HttpClientRequest.html">module:vertx/http.HttpClientRequest</a></span>


	</dd>
</dl>

        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="patch"><span class="type-signature"></span>patch<span class="signature">(uri, handler)</span><span class="type-signature"> &rarr; {<a href="http.HttpClientRequest.html">module:vertx/http.HttpClientRequest</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        This method returns an request which represents an HTTP PATCH request with the specified uri.
When an HTTP response is received from the server the handler is called passing in the response.
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>uri</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
            
            
            
            <td class="description last">A relative URI where to perform the PATCH on the server.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>handler</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#ResponseHandler">ResponseHandler</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">The handler to be called</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="http.js.html">vertx/http.js</a>, <a href="http.js.html#line1065">line 1065</a>
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type"><a href="http.HttpClientRequest.html">module:vertx/http.HttpClientRequest</a></span>


	</dd>
</dl>

        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="port"><span class="type-signature"></span>port<span class="signature">(<span class="optional">port</span>)</span><span class="type-signature"> &rarr; {number|<a href="http.HttpClient.html">module:vertx/http.HttpClient</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Get or set the port that the client will attempt to connect to on the
server on. The default value is 80
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		<th>Argument</th>
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>port</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>
            
            
                <td class="attributes">
                
                    &lt;optional><br>
                
                    
                
                    
                
                </td>
            
            
            
            
            <td class="description last">The port to connect on.</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="http.js.html">vertx/http.js</a>, <a href="http.js.html#line893">line 893</a>
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type">number</span>
|

<span class="param-type"><a href="http.HttpClient.html">module:vertx/http.HttpClient</a></span>


	</dd>
</dl>

        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="post"><span class="type-signature"></span>post<span class="signature">(uri, handler)</span><span class="type-signature"> &rarr; {<a href="http.HttpClientRequest.html">module:vertx/http.HttpClientRequest</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        This method returns an request which represents an HTTP POST request with the specified uri.
When an HTTP response is received from the server the handler is called passing in the response.
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>uri</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
            
            
            
            <td class="description last">A relative URI where to perform the POST on the server.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>handler</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#ResponseHandler">ResponseHandler</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">The handler to be called</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="http.js.html">vertx/http.js</a>, <a href="http.js.html#line1005">line 1005</a>
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type"><a href="http.HttpClientRequest.html">module:vertx/http.HttpClientRequest</a></span>


	</dd>
</dl>

        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="put"><span class="type-signature"></span>put<span class="signature">(uri, handler)</span><span class="type-signature"> &rarr; {<a href="http.HttpClientRequest.html">module:vertx/http.HttpClientRequest</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        This method returns an request which represents an HTTP PUT request with the specified uri.
When an HTTP response is received from the server the handler is called passing in the response.
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>uri</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
            
            
            
            <td class="description last">A relative URI where to perform the PUT on the server.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>handler</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#ResponseHandler">ResponseHandler</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">The handler to be called</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="http.js.html">vertx/http.js</a>, <a href="http.js.html#line1017">line 1017</a>
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type"><a href="http.HttpClientRequest.html">module:vertx/http.HttpClientRequest</a></span>


	</dd>
</dl>

        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="request"><span class="type-signature"></span>request<span class="signature">(method, uri, handler)</span><span class="type-signature"> &rarr; {<a href="http.HttpClientRequest.html">module:vertx/http.HttpClientRequest</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        This method returns an request which represents an HTTP request with the specified uri.
When an HTTP response is received from the server the handler is called passing in the response.
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>method</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
            
            
            
            <td class="description last">The HTTP method which is used for the request</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>uri</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
            
            
            
            <td class="description last">A relative URI where to perform the PUT on the server.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>handler</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#ResponseHandler">ResponseHandler</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">The handler to be called</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="http.js.html">vertx/http.js</a>, <a href="http.js.html#line1078">line 1078</a>
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type"><a href="http.HttpClientRequest.html">module:vertx/http.HttpClientRequest</a></span>


	</dd>
</dl>

        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="trace"><span class="type-signature"></span>trace<span class="signature">(uri, handler)</span><span class="type-signature"> &rarr; {<a href="http.HttpClientRequest.html">module:vertx/http.HttpClientRequest</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        This method returns an request which represents an HTTP TRACE request with the specified uri.
When an HTTP response is received from the server the handler is called passing in the response.
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>uri</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
            
            
            
            <td class="description last">A relative URI where to perform the TRACE on the server.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>handler</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#ResponseHandler">ResponseHandler</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">The handler to be called</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="http.js.html">vertx/http.js</a>, <a href="http.js.html#line1041">line 1041</a>
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type"><a href="http.HttpClientRequest.html">module:vertx/http.HttpClientRequest</a></span>


	</dd>
</dl>

        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="verifyHost"><span class="type-signature"></span>verifyHost<span class="signature">(verify)</span><span class="type-signature"> &rarr; {boolean|<a href="http.HttpClient.html">module:vertx/http.HttpClient</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Get or set if the host should be verified.  If set then the client will
try to validate the remote server's certificate hostname against the
requested host. Should default to 'true'.
This method should only be used in SSL mode
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>verify</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">boolean</span>


            
            </td>
            
            
            
            
            
            <td class="description last">whether or not to verify hosts</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="http.js.html">vertx/http.js</a>, <a href="http.js.html#line927">line 927</a>
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type">boolean</span>
|

<span class="param-type"><a href="http.HttpClient.html">module:vertx/http.HttpClient</a></span>


	</dd>
</dl>

        
    
    
</dd>

        </dl>
    
    
    
    
    
</article>

</section>  




</div>

<nav>
    <h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="module-vertx.html">vertx</a></li><li><a href="buffer.html">vertx/buffer</a></li><li><a href="console.html">vertx/console</a></li><li><a href="container.html">vertx/container</a></li><li><a href="event_bus.html">vertx/event_bus</a></li><li><a href="file_system.html">vertx/file_system</a></li><li><a href="http.html">vertx/http</a></li><li><a href="multi_map.html">vertx/multi_map</a></li><li><a href="net.html">vertx/net</a></li><li><a href="parse_tools.html">vertx/parse_tools</a></li><li><a href="pump.html">vertx/pump</a></li><li><a href="shared_data.html">vertx/shared_data</a></li><li><a href="sockjs.html">vertx/sockjs</a></li><li><a href="timer.html">vertx/timer</a></li></ul><h3>Externals</h3><ul><li><a href="InetSocketAddress.html">InetSocketAddress</a></li><li><a href="Buffer_.html">Buffer</a></li><li><a href="RecordParser.html">RecordParser</a></li><li><a href="SockJSSocket.html">SockJSSocket</a></li></ul><h3>Classes</h3><ul><li><a href="buffer-Buffer.html">Buffer</a></li><li><a href="file_system.AsyncFile.html">AsyncFile</a></li><li><a href="http.HttpClient.html">HttpClient</a></li><li><a href="http.HttpClientRequest.html">HttpClientRequest</a></li><li><a href="http.HttpClientResponse.html">HttpClientResponse</a></li><li><a href="http.HttpServer.html">HttpServer</a></li><li><a href="http.HttpServerFileUpload.html">HttpServerFileUpload</a></li><li><a href="http.HttpServerRequest.html">HttpServerRequest</a></li><li><a href="http.HttpServerResponse.html">HttpServerResponse</a></li><li><a href="http.RouteMatcher.html">RouteMatcher</a></li><li><a href="http.WebSocket.html">WebSocket</a></li><li><a href="multi_map-MultiMap.html">MultiMap</a></li><li><a href="net.NetClient.html">NetClient</a></li><li><a href="net.NetServer.html">NetServer</a></li><li><a href="net.NetSocket.html">NetSocket</a></li><li><a href="pump-Pump.html">Pump</a></li><li><a href="sockjs.SockJSServer.html">SockJSServer</a></li></ul><h3>Mixins</h3><ul><li><a href="ClientSSLSupport.html">ClientSSLSupport</a></li><li><a href="ReadStream.html">ReadStream</a></li><li><a href="ServerSSLSupport.html">ServerSSLSupport</a></li><li><a href="ServerTCPSupport.html">ServerTCPSupport</a></li><li><a href="SSLSupport.html">SSLSupport</a></li><li><a href="TCPSupport.html">TCPSupport</a></li><li><a href="WriteStream.html">WriteStream</a></li></ul><h3><a href="global.html">Global</a></h3>
</nav>

<br clear="both">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Wed Jul 17 2013 20:27:23 GMT+0100 (BST)
</footer>

<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>